3.4.78 \(\int (g x)^m (d+e x)^n (a+c x^2) \, dx\) [378]

Optimal. Leaf size=164 \[ -\frac {c d (2+m) (g x)^{1+m} (d+e x)^{1+n}}{e^2 g (2+m+n) (3+m+n)}+\frac {c (g x)^{2+m} (d+e x)^{1+n}}{e g^2 (3+m+n)}+\frac {\left (c d^2 (1+m) (2+m)+a e^2 (2+m+n) (3+m+n)\right ) (g x)^{1+m} (d+e x)^n \left (1+\frac {e x}{d}\right )^{-n} \, _2F_1\left (1+m,-n;2+m;-\frac {e x}{d}\right )}{e^2 g (1+m) (2+m+n) (3+m+n)} \]

[Out]

-c*d*(2+m)*(g*x)^(1+m)*(e*x+d)^(1+n)/e^2/g/(2+m+n)/(3+m+n)+c*(g*x)^(2+m)*(e*x+d)^(1+n)/e/g^2/(3+m+n)+(c*d^2*(1
+m)*(2+m)+a*e^2*(2+m+n)*(3+m+n))*(g*x)^(1+m)*(e*x+d)^n*hypergeom([-n, 1+m],[2+m],-e*x/d)/e^2/g/(1+m)/(2+m+n)/(
3+m+n)/((1+e*x/d)^n)

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 150, normalized size of antiderivative = 0.91, number of steps used = 4, number of rules used = 4, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {966, 81, 68, 66} \begin {gather*} \frac {(g x)^{m+1} (d+e x)^n \left (\frac {e x}{d}+1\right )^{-n} \left (\frac {a}{m+1}+\frac {c d^2 (m+2)}{e^2 (m+n+2) (m+n+3)}\right ) \, _2F_1\left (m+1,-n;m+2;-\frac {e x}{d}\right )}{g}-\frac {c d (m+2) (g x)^{m+1} (d+e x)^{n+1}}{e^2 g (m+n+2) (m+n+3)}+\frac {c (g x)^{m+2} (d+e x)^{n+1}}{e g^2 (m+n+3)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(g*x)^m*(d + e*x)^n*(a + c*x^2),x]

[Out]

-((c*d*(2 + m)*(g*x)^(1 + m)*(d + e*x)^(1 + n))/(e^2*g*(2 + m + n)*(3 + m + n))) + (c*(g*x)^(2 + m)*(d + e*x)^
(1 + n))/(e*g^2*(3 + m + n)) + ((a/(1 + m) + (c*d^2*(2 + m))/(e^2*(2 + m + n)*(3 + m + n)))*(g*x)^(1 + m)*(d +
 e*x)^n*Hypergeometric2F1[1 + m, -n, 2 + m, -((e*x)/d)])/(g*(1 + (e*x)/d)^n)

Rule 66

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[c^n*((b*x)^(m + 1)/(b*(m + 1)))*Hypergeometr
ic2F1[-n, m + 1, m + 2, (-d)*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[m] && (IntegerQ[n] || (GtQ[
c, 0] &&  !(EqQ[n, -2^(-1)] && EqQ[c^2 - d^2, 0] && GtQ[-d/(b*c), 0])))

Rule 68

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Dist[c^IntPart[n]*((c + d*x)^FracPart[n]/(1 + d*(
x/c))^FracPart[n]), Int[(b*x)^m*(1 + d*(x/c))^n, x], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[m] &&  !Int
egerQ[n] &&  !GtQ[c, 0] &&  !GtQ[-d/(b*c), 0] && ((RationalQ[m] &&  !(EqQ[n, -2^(-1)] && EqQ[c^2 - d^2, 0])) |
|  !RationalQ[n])

Rule 81

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[b*(c + d*x)^
(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), x] + Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(
d*f*(n + p + 2)), Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2,
0]

Rule 966

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[c^p*(d
+ e*x)^(m + 2*p)*((f + g*x)^(n + 1)/(g*e^(2*p)*(m + n + 2*p + 1))), x] + Dist[1/(g*e^(2*p)*(m + n + 2*p + 1)),
 Int[(d + e*x)^m*(f + g*x)^n*ExpandToSum[g*(m + n + 2*p + 1)*(e^(2*p)*(a + c*x^2)^p - c^p*(d + e*x)^(2*p)) - c
^p*(e*f - d*g)*(m + 2*p)*(d + e*x)^(2*p - 1), x], x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0]
&& NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0] && NeQ[m + n + 2*p + 1, 0] && (IntegerQ[n] ||  !IntegerQ[m])

Rubi steps

\begin {align*} \int (g x)^m (d+e x)^n \left (a+c x^2\right ) \, dx &=\frac {c (g x)^{2+m} (d+e x)^{1+n}}{e g^2 (3+m+n)}+\frac {\int (g x)^m (d+e x)^n \left (a e g^2 (3+m+n)-c d g^2 (2+m) x\right ) \, dx}{e g^2 (3+m+n)}\\ &=-\frac {c d (2+m) (g x)^{1+m} (d+e x)^{1+n}}{e^2 g (2+m+n) (3+m+n)}+\frac {c (g x)^{2+m} (d+e x)^{1+n}}{e g^2 (3+m+n)}+\left (a+\frac {c d^2 (1+m) (2+m)}{e^2 (2+m+n) (3+m+n)}\right ) \int (g x)^m (d+e x)^n \, dx\\ &=-\frac {c d (2+m) (g x)^{1+m} (d+e x)^{1+n}}{e^2 g (2+m+n) (3+m+n)}+\frac {c (g x)^{2+m} (d+e x)^{1+n}}{e g^2 (3+m+n)}+\left (\left (a+\frac {c d^2 (1+m) (2+m)}{e^2 (2+m+n) (3+m+n)}\right ) (d+e x)^n \left (1+\frac {e x}{d}\right )^{-n}\right ) \int (g x)^m \left (1+\frac {e x}{d}\right )^n \, dx\\ &=-\frac {c d (2+m) (g x)^{1+m} (d+e x)^{1+n}}{e^2 g (2+m+n) (3+m+n)}+\frac {c (g x)^{2+m} (d+e x)^{1+n}}{e g^2 (3+m+n)}+\frac {\left (a+\frac {c d^2 (1+m) (2+m)}{e^2 (2+m+n) (3+m+n)}\right ) (g x)^{1+m} (d+e x)^n \left (1+\frac {e x}{d}\right )^{-n} \, _2F_1\left (1+m,-n;2+m;-\frac {e x}{d}\right )}{g (1+m)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 113, normalized size = 0.69 \begin {gather*} \frac {x (g x)^m (d+e x)^n \left (1+\frac {e x}{d}\right )^{-n} \left (c d^2 \, _2F_1\left (1+m,-2-n;2+m;-\frac {e x}{d}\right )-2 c d^2 \, _2F_1\left (1+m,-1-n;2+m;-\frac {e x}{d}\right )+\left (c d^2+a e^2\right ) \, _2F_1\left (1+m,-n;2+m;-\frac {e x}{d}\right )\right )}{e^2 (1+m)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(g*x)^m*(d + e*x)^n*(a + c*x^2),x]

[Out]

(x*(g*x)^m*(d + e*x)^n*(c*d^2*Hypergeometric2F1[1 + m, -2 - n, 2 + m, -((e*x)/d)] - 2*c*d^2*Hypergeometric2F1[
1 + m, -1 - n, 2 + m, -((e*x)/d)] + (c*d^2 + a*e^2)*Hypergeometric2F1[1 + m, -n, 2 + m, -((e*x)/d)]))/(e^2*(1
+ m)*(1 + (e*x)/d)^n)

________________________________________________________________________________________

Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \left (g x \right )^{m} \left (e x +d \right )^{n} \left (c \,x^{2}+a \right )\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x)^m*(e*x+d)^n*(c*x^2+a),x)

[Out]

int((g*x)^m*(e*x+d)^n*(c*x^2+a),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x)^m*(e*x+d)^n*(c*x^2+a),x, algorithm="maxima")

[Out]

integrate((c*x^2 + a)*(g*x)^m*(x*e + d)^n, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x)^m*(e*x+d)^n*(c*x^2+a),x, algorithm="fricas")

[Out]

integral((c*x^2 + a)*(g*x)^m*(x*e + d)^n, x)

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 7.10, size = 82, normalized size = 0.50 \begin {gather*} \frac {a d^{n} g^{m} x x^{m} \Gamma \left (m + 1\right ) {{}_{2}F_{1}\left (\begin {matrix} - n, m + 1 \\ m + 2 \end {matrix}\middle | {\frac {e x e^{i \pi }}{d}} \right )}}{\Gamma \left (m + 2\right )} + \frac {c d^{n} g^{m} x^{3} x^{m} \Gamma \left (m + 3\right ) {{}_{2}F_{1}\left (\begin {matrix} - n, m + 3 \\ m + 4 \end {matrix}\middle | {\frac {e x e^{i \pi }}{d}} \right )}}{\Gamma \left (m + 4\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x)**m*(e*x+d)**n*(c*x**2+a),x)

[Out]

a*d**n*g**m*x*x**m*gamma(m + 1)*hyper((-n, m + 1), (m + 2,), e*x*exp_polar(I*pi)/d)/gamma(m + 2) + c*d**n*g**m
*x**3*x**m*gamma(m + 3)*hyper((-n, m + 3), (m + 4,), e*x*exp_polar(I*pi)/d)/gamma(m + 4)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x)^m*(e*x+d)^n*(c*x^2+a),x, algorithm="giac")

[Out]

integrate((c*x^2 + a)*(g*x)^m*(x*e + d)^n, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (g\,x\right )}^m\,\left (c\,x^2+a\right )\,{\left (d+e\,x\right )}^n \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x)^m*(a + c*x^2)*(d + e*x)^n,x)

[Out]

int((g*x)^m*(a + c*x^2)*(d + e*x)^n, x)

________________________________________________________________________________________